
import { MemberUI } from "./memberUI";
export class TeamUI {
    private members:Array<MemberUI|null>;

    constructor(memberCount:number){
        this.members = new Array<MemberUI|null>(memberCount);
    }

    public setMember(memberIndex:number, member:MemberUI|null){
        this.members[memberIndex] = member;
    }
    public clearMember(memberIndex:number){
        this.setMember(memberIndex,null);
    }
    public isEmpty():boolean{
        return this.members.length == 0;
    }
    public clear(){
        for(let i=0;i<this.members.length;++i){
            this.setMember(i,null);
        }
    }
    public getList():Array<MemberUI|null>{
        return this.members;
    }
}